#include"dao_gsl_others.h"

void Dao_Get_Object_Method( DaoCData *cd, DaoObject **ob, DaoRoutine **ro, const char *name )
{
  DValue va;
  if( cd == NULL ) return;
  *ob = DaoCData_GetObject( cd );
  if( *ob == NULL ) return;
  va = DaoObject_GetField( *ob, name );
  if( va.t == DAO_ROUTINE ) *ro = va.v.routine;
}

static double Function_1000e( DaoRoutine *_ro, DaoObject *_ob, const gsl_vector* x, void* self0 )
{
  const DValue _dao_nil = {0,0,0,0,{0}};
  DValue _dp[2] = { _dao_nil, _dao_nil };
  DValue *_dp2[2] = { _dp+0, _dp+1 };
  DValue _res;
  DaoCData *_cd;
  DaoVmProcess *_vmp;
  double _f= (double)0;
  if( _ro == NULL ) goto EndCall;
  _dp[0] = DValue_WrapCData( dao_gsl_vector_Typer, (void*) x );
  _dp[1] = DValue_WrapCData( NULL, (void*) self0 );

  _vmp = DaoVmSpace_AcquireProcess( __daoVmSpace );
  if( DaoVmProcess_Call( _vmp, _ro, _ob, _dp2, 2 ) ==0 ) goto EndCall;
  _res = DaoVmProcess_GetReturned( _vmp );
  DaoVmSpace_ReleaseProcess( __daoVmSpace, _vmp );
  if( _res.t == DAO_DOUBLE ) _f= (double) _res.v.d;

EndCall:
  DValue_ClearAll( _dp, 2 );
  return _f;
}

static double Function_1000a( DaoRoutine *_ro, DaoObject *_ob, double x_array[], size_t dim, void* self0 )
{
  const DValue _dao_nil = {0,0,0,0,{0}};
  DValue _dp[3] = { _dao_nil, _dao_nil, _dao_nil };
  DValue *_dp2[3] = { _dp+0, _dp+1, _dp+2 };
  DValue _res;
  DaoCData *_cd;
  DaoVmProcess *_vmp;
  double _f= (double)0;
  if( _ro == NULL ) goto EndCall;
  _dp[0] = DValue_NewVectorD( (double*) x_array, dim );
  _dp[1] = DValue_NewInteger( (int) dim );
  _dp[2] = DValue_WrapCData( NULL, (void*) self0 );

  _vmp = DaoVmSpace_AcquireProcess( __daoVmSpace );
  if( DaoVmProcess_Call( _vmp, _ro, _ob, _dp2, 3 ) ==0 ) goto EndCall;
  _res = DaoVmProcess_GetReturned( _vmp );
  DaoVmSpace_ReleaseProcess( __daoVmSpace, _vmp );
  if( _res.t == DAO_DOUBLE ) _f= (double) _res.v.d;

EndCall:
  DValue_ClearAll( _dp, 3 );
  return _f;
}

static double Function_10007( DaoRoutine *_ro, DaoObject *_ob, double x, void* self0 )
{
  const DValue _dao_nil = {0,0,0,0,{0}};
  DValue _dp[2] = { _dao_nil, _dao_nil };
  DValue *_dp2[2] = { _dp+0, _dp+1 };
  DValue _res;
  DaoCData *_cd;
  DaoVmProcess *_vmp;
  double _function= (double)0;
  if( _ro == NULL ) goto EndCall;
  _dp[0] = DValue_NewDouble( (double) x );
  _dp[1] = DValue_WrapCData( NULL, (void*) self0 );

  _vmp = DaoVmSpace_AcquireProcess( __daoVmSpace );
  if( DaoVmProcess_Call( _vmp, _ro, _ob, _dp2, 2 ) ==0 ) goto EndCall;
  _res = DaoVmProcess_GetReturned( _vmp );
  DaoVmSpace_ReleaseProcess( __daoVmSpace, _vmp );
  if( _res.t == DAO_DOUBLE ) _function= (double) _res.v.d;

EndCall:
  DValue_ClearAll( _dp, 2 );
  return _function;
}

static double Function_10012( DaoRoutine *_ro, DaoObject *_ob, void* ntuple_data, void* self0 )
{
  const DValue _dao_nil = {0,0,0,0,{0}};
  DValue _dp[2] = { _dao_nil, _dao_nil };
  DValue *_dp2[2] = { _dp+0, _dp+1 };
  DValue _res;
  DaoCData *_cd;
  DaoVmProcess *_vmp;
  double _function= (double)0;
  if( _ro == NULL ) goto EndCall;
  _dp[0] = DValue_WrapCData( NULL, (void*) ntuple_data );
  _dp[1] = DValue_WrapCData( NULL, (void*) self0 );

  _vmp = DaoVmSpace_AcquireProcess( __daoVmSpace );
  if( DaoVmProcess_Call( _vmp, _ro, _ob, _dp2, 2 ) ==0 ) goto EndCall;
  _res = DaoVmProcess_GetReturned( _vmp );
  DaoVmSpace_ReleaseProcess( __daoVmSpace, _vmp );
  if( _res.t == DAO_DOUBLE ) _function= (double) _res.v.d;

EndCall:
  DValue_ClearAll( _dp, 2 );
  return _function;
}

static int Function_1000c( DaoRoutine *_ro, DaoObject *_ob, const gsl_vector* x, void* self0, gsl_matrix* df )
{
  const DValue _dao_nil = {0,0,0,0,{0}};
  DValue _dp[3] = { _dao_nil, _dao_nil, _dao_nil };
  DValue *_dp2[3] = { _dp+0, _dp+1, _dp+2 };
  DValue _res;
  DaoCData *_cd;
  DaoVmProcess *_vmp;
  int _df= (int)0;
  if( _ro == NULL ) goto EndCall;
  _dp[0] = DValue_WrapCData( dao_gsl_vector_Typer, (void*) x );
  _dp[1] = DValue_WrapCData( NULL, (void*) self0 );
  _dp[2] = DValue_WrapCData( dao_gsl_matrix_Typer, (void*) df );

  _vmp = DaoVmSpace_AcquireProcess( __daoVmSpace );
  if( DaoVmProcess_Call( _vmp, _ro, _ob, _dp2, 3 ) ==0 ) goto EndCall;
  _res = DaoVmProcess_GetReturned( _vmp );
  DaoVmSpace_ReleaseProcess( __daoVmSpace, _vmp );
  if( _res.t == DAO_INTEGER ) _df= (int) _res.v.i;

EndCall:
  DValue_ClearAll( _dp, 3 );
  return _df;
}

static int Function_1000b( DaoRoutine *_ro, DaoObject *_ob, const gsl_vector* x, void* self0, gsl_vector* f )
{
  const DValue _dao_nil = {0,0,0,0,{0}};
  DValue _dp[3] = { _dao_nil, _dao_nil, _dao_nil };
  DValue *_dp2[3] = { _dp+0, _dp+1, _dp+2 };
  DValue _res;
  DaoCData *_cd;
  DaoVmProcess *_vmp;
  int _f= (int)0;
  if( _ro == NULL ) goto EndCall;
  _dp[0] = DValue_WrapCData( dao_gsl_vector_Typer, (void*) x );
  _dp[1] = DValue_WrapCData( NULL, (void*) self0 );
  _dp[2] = DValue_WrapCData( dao_gsl_vector_Typer, (void*) f );

  _vmp = DaoVmSpace_AcquireProcess( __daoVmSpace );
  if( DaoVmProcess_Call( _vmp, _ro, _ob, _dp2, 3 ) ==0 ) goto EndCall;
  _res = DaoVmProcess_GetReturned( _vmp );
  DaoVmSpace_ReleaseProcess( __daoVmSpace, _vmp );
  if( _res.t == DAO_INTEGER ) _f= (int) _res.v.i;

EndCall:
  DValue_ClearAll( _dp, 3 );
  return _f;
}

static int Function_1000d( DaoRoutine *_ro, DaoObject *_ob, const gsl_vector* x, void* self0, gsl_vector* f, gsl_matrix* df )
{
  const DValue _dao_nil = {0,0,0,0,{0}};
  DValue _dp[4] = { _dao_nil, _dao_nil, _dao_nil, _dao_nil };
  DValue *_dp2[4] = { _dp+0, _dp+1, _dp+2, _dp+3 };
  DValue _res;
  DaoCData *_cd;
  DaoVmProcess *_vmp;
  int _fdf= (int)0;
  if( _ro == NULL ) goto EndCall;
  _dp[0] = DValue_WrapCData( dao_gsl_vector_Typer, (void*) x );
  _dp[1] = DValue_WrapCData( NULL, (void*) self0 );
  _dp[2] = DValue_WrapCData( dao_gsl_vector_Typer, (void*) f );
  _dp[3] = DValue_WrapCData( dao_gsl_matrix_Typer, (void*) df );

  _vmp = DaoVmSpace_AcquireProcess( __daoVmSpace );
  if( DaoVmProcess_Call( _vmp, _ro, _ob, _dp2, 4 ) ==0 ) goto EndCall;
  _res = DaoVmProcess_GetReturned( _vmp );
  DaoVmSpace_ReleaseProcess( __daoVmSpace, _vmp );
  if( _res.t == DAO_INTEGER ) _fdf= (int) _res.v.i;

EndCall:
  DValue_ClearAll( _dp, 4 );
  return _fdf;
}

static int Function_10014( DaoRoutine *_ro, DaoObject *_ob, double t, const double y[], double dfdy[], double dfdt[], void* self0 )
{
  const DValue _dao_nil = {0,0,0,0,{0}};
  DValue _dp[5] = { _dao_nil, _dao_nil, _dao_nil, _dao_nil, _dao_nil };
  DValue *_dp2[5] = { _dp+0, _dp+1, _dp+2, _dp+3, _dp+4 };
  DValue _res;
  DaoCData *_cd;
  DaoVmProcess *_vmp;
  int _jacobian= (int)0;
  if( _ro == NULL ) goto EndCall;
  _dp[0] = DValue_NewDouble( (double) t );
  _dp[1] = DValue_NewVectorD( (double*) y, 0 );
  _dp[2] = DValue_NewVectorD( (double*) dfdy, 0 );
  _dp[3] = DValue_NewVectorD( (double*) dfdt, 0 );
  _dp[4] = DValue_WrapCData( NULL, (void*) self0 );

  _vmp = DaoVmSpace_AcquireProcess( __daoVmSpace );
  if( DaoVmProcess_Call( _vmp, _ro, _ob, _dp2, 5 ) ==0 ) goto EndCall;
  _res = DaoVmProcess_GetReturned( _vmp );
  DaoVmSpace_ReleaseProcess( __daoVmSpace, _vmp );
  if( _res.t == DAO_INTEGER ) _jacobian= (int) _res.v.i;

EndCall:
  DValue_ClearAll( _dp, 5 );
  return _jacobian;
}

static int Function_10013( DaoRoutine *_ro, DaoObject *_ob, double t, const double y[], double dydt[], void* self0 )
{
  const DValue _dao_nil = {0,0,0,0,{0}};
  DValue _dp[4] = { _dao_nil, _dao_nil, _dao_nil, _dao_nil };
  DValue *_dp2[4] = { _dp+0, _dp+1, _dp+2, _dp+3 };
  DValue _res;
  DaoCData *_cd;
  DaoVmProcess *_vmp;
  int _function= (int)0;
  if( _ro == NULL ) goto EndCall;
  _dp[0] = DValue_NewDouble( (double) t );
  _dp[1] = DValue_NewVectorD( (double*) y, 0 );
  _dp[2] = DValue_NewVectorD( (double*) dydt, 0 );
  _dp[3] = DValue_WrapCData( NULL, (void*) self0 );

  _vmp = DaoVmSpace_AcquireProcess( __daoVmSpace );
  if( DaoVmProcess_Call( _vmp, _ro, _ob, _dp2, 4 ) ==0 ) goto EndCall;
  _res = DaoVmProcess_GetReturned( _vmp );
  DaoVmSpace_ReleaseProcess( __daoVmSpace, _vmp );
  if( _res.t == DAO_INTEGER ) _function= (int) _res.v.i;

EndCall:
  DValue_ClearAll( _dp, 4 );
  return _function;
}

static int Function_10009( DaoRoutine *_ro, DaoObject *_ob, double x, double y[], void* self0 )
{
  const DValue _dao_nil = {0,0,0,0,{0}};
  DValue _dp[3] = { _dao_nil, _dao_nil, _dao_nil };
  DValue *_dp2[3] = { _dp+0, _dp+1, _dp+2 };
  DValue _res;
  DaoCData *_cd;
  DaoVmProcess *_vmp;
  int _function= (int)0;
  if( _ro == NULL ) goto EndCall;
  _dp[0] = DValue_NewDouble( (double) x );
  _dp[1] = DValue_NewVectorD( (double*) y, 0 );
  _dp[2] = DValue_WrapCData( NULL, (void*) self0 );

  _vmp = DaoVmSpace_AcquireProcess( __daoVmSpace );
  if( DaoVmProcess_Call( _vmp, _ro, _ob, _dp2, 3 ) ==0 ) goto EndCall;
  _res = DaoVmProcess_GetReturned( _vmp );
  DaoVmSpace_ReleaseProcess( __daoVmSpace, _vmp );
  if( _res.t == DAO_INTEGER ) _function= (int) _res.v.i;

EndCall:
  DValue_ClearAll( _dp, 3 );
  return _function;
}

static int Function_10011( DaoRoutine *_ro, DaoObject *_ob, void* ntuple_data, void* self0 )
{
  const DValue _dao_nil = {0,0,0,0,{0}};
  DValue _dp[2] = { _dao_nil, _dao_nil };
  DValue *_dp2[2] = { _dp+0, _dp+1 };
  DValue _res;
  DaoCData *_cd;
  DaoVmProcess *_vmp;
  int _function= (int)0;
  if( _ro == NULL ) goto EndCall;
  _dp[0] = DValue_WrapCData( NULL, (void*) ntuple_data );
  _dp[1] = DValue_WrapCData( NULL, (void*) self0 );

  _vmp = DaoVmSpace_AcquireProcess( __daoVmSpace );
  if( DaoVmProcess_Call( _vmp, _ro, _ob, _dp2, 2 ) ==0 ) goto EndCall;
  _res = DaoVmProcess_GetReturned( _vmp );
  DaoVmSpace_ReleaseProcess( __daoVmSpace, _vmp );
  if( _res.t == DAO_INTEGER ) _function= (int) _res.v.i;

EndCall:
  DValue_ClearAll( _dp, 2 );
  return _function;
}

static void Function_10010( DaoRoutine *_ro, DaoObject *_ob, const gsl_vector* x, void* self0, double* f, gsl_vector* df )
{
  const DValue _dao_nil = {0,0,0,0,{0}};
  DValue _dp[4] = { _dao_nil, _dao_nil, _dao_nil, _dao_nil };
  DValue *_dp2[4] = { _dp+0, _dp+1, _dp+2, _dp+3 };
  if( _ro == NULL ) return;
  _dp[0] = DValue_WrapCData( dao_gsl_vector_Typer, (void*) x );
  _dp[1] = DValue_WrapCData( NULL, (void*) self0 );
  _dp[2] = DValue_NewDouble( (double) *f );
  _dp[3] = DValue_WrapCData( dao_gsl_vector_Typer, (void*) df );

  DaoVmProcess *_vmp = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoVmProcess_Call( _vmp, _ro, _ob, _dp2, 4 );
  DaoVmSpace_ReleaseProcess( __daoVmSpace, _vmp );
  DValue_ClearAll( _dp, 4 );
}

static void Function_1000f( DaoRoutine *_ro, DaoObject *_ob, const gsl_vector* x, void* self0, gsl_vector* df )
{
  const DValue _dao_nil = {0,0,0,0,{0}};
  DValue _dp[3] = { _dao_nil, _dao_nil, _dao_nil };
  DValue *_dp2[3] = { _dp+0, _dp+1, _dp+2 };
  if( _ro == NULL ) return;
  _dp[0] = DValue_WrapCData( dao_gsl_vector_Typer, (void*) x );
  _dp[1] = DValue_WrapCData( NULL, (void*) self0 );
  _dp[2] = DValue_WrapCData( dao_gsl_vector_Typer, (void*) df );

  DaoVmProcess *_vmp = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoVmProcess_Call( _vmp, _ro, _ob, _dp2, 3 );
  DaoVmSpace_ReleaseProcess( __daoVmSpace, _vmp );
  DValue_ClearAll( _dp, 3 );
}

static void Function_10008( DaoRoutine *_ro, DaoObject *_ob, double x, void* self0, double* f, double* df )
{
  const DValue _dao_nil = {0,0,0,0,{0}};
  DValue _dp[4] = { _dao_nil, _dao_nil, _dao_nil, _dao_nil };
  DValue *_dp2[4] = { _dp+0, _dp+1, _dp+2, _dp+3 };
  if( _ro == NULL ) return;
  _dp[0] = DValue_NewDouble( (double) x );
  _dp[1] = DValue_WrapCData( NULL, (void*) self0 );
  _dp[2] = DValue_NewDouble( (double) *f );
  _dp[3] = DValue_NewDouble( (double) *df );

  DaoVmProcess *_vmp = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoVmProcess_Call( _vmp, _ro, _ob, _dp2, 4 );
  DaoVmSpace_ReleaseProcess( __daoVmSpace, _vmp );
  DValue_ClearAll( _dp, 4 );
}

gsl_cheb_series* Dao_gsl_cheb_series_New()
{
	gsl_cheb_series *self = calloc( 1, sizeof(gsl_cheb_series) );
	return self;
}

gsl_dht* Dao_gsl_dht_New()
{
	gsl_dht *self = calloc( 1, sizeof(gsl_dht) );
	return self;
}

gsl_eigen_francis_workspace* Dao_gsl_eigen_francis_workspace_New()
{
	gsl_eigen_francis_workspace *self = calloc( 1, sizeof(gsl_eigen_francis_workspace) );
	return self;
}

gsl_eigen_gen_workspace* Dao_gsl_eigen_gen_workspace_New()
{
	gsl_eigen_gen_workspace *self = calloc( 1, sizeof(gsl_eigen_gen_workspace) );
	return self;
}

gsl_eigen_genherm_workspace* Dao_gsl_eigen_genherm_workspace_New()
{
	gsl_eigen_genherm_workspace *self = calloc( 1, sizeof(gsl_eigen_genherm_workspace) );
	return self;
}

gsl_eigen_genhermv_workspace* Dao_gsl_eigen_genhermv_workspace_New()
{
	gsl_eigen_genhermv_workspace *self = calloc( 1, sizeof(gsl_eigen_genhermv_workspace) );
	return self;
}

gsl_eigen_gensymm_workspace* Dao_gsl_eigen_gensymm_workspace_New()
{
	gsl_eigen_gensymm_workspace *self = calloc( 1, sizeof(gsl_eigen_gensymm_workspace) );
	return self;
}

gsl_eigen_gensymmv_workspace* Dao_gsl_eigen_gensymmv_workspace_New()
{
	gsl_eigen_gensymmv_workspace *self = calloc( 1, sizeof(gsl_eigen_gensymmv_workspace) );
	return self;
}

gsl_eigen_genv_workspace* Dao_gsl_eigen_genv_workspace_New()
{
	gsl_eigen_genv_workspace *self = calloc( 1, sizeof(gsl_eigen_genv_workspace) );
	return self;
}

gsl_eigen_herm_workspace* Dao_gsl_eigen_herm_workspace_New()
{
	gsl_eigen_herm_workspace *self = calloc( 1, sizeof(gsl_eigen_herm_workspace) );
	return self;
}

gsl_eigen_hermv_workspace* Dao_gsl_eigen_hermv_workspace_New()
{
	gsl_eigen_hermv_workspace *self = calloc( 1, sizeof(gsl_eigen_hermv_workspace) );
	return self;
}

gsl_eigen_nonsymm_workspace* Dao_gsl_eigen_nonsymm_workspace_New()
{
	gsl_eigen_nonsymm_workspace *self = calloc( 1, sizeof(gsl_eigen_nonsymm_workspace) );
	return self;
}

gsl_eigen_nonsymmv_workspace* Dao_gsl_eigen_nonsymmv_workspace_New()
{
	gsl_eigen_nonsymmv_workspace *self = calloc( 1, sizeof(gsl_eigen_nonsymmv_workspace) );
	return self;
}

gsl_eigen_symm_workspace* Dao_gsl_eigen_symm_workspace_New()
{
	gsl_eigen_symm_workspace *self = calloc( 1, sizeof(gsl_eigen_symm_workspace) );
	return self;
}

gsl_eigen_symmv_workspace* Dao_gsl_eigen_symmv_workspace_New()
{
	gsl_eigen_symmv_workspace *self = calloc( 1, sizeof(gsl_eigen_symmv_workspace) );
	return self;
}

Dao_gsl_function* Dao_gsl_function_New()
{
	Dao_gsl_function *wrap = calloc( 1, sizeof(Dao_gsl_function) );
	gsl_function *self = (gsl_function*) wrap;
	wrap->cdata = DaoCData_New( dao_gsl_function_Typer, wrap );
	wrap->object = self;
	self->function = Dao_gsl_function_function;
	self->params = wrap;
	return wrap;
}
/*
gsl_function* Dao_gsl_function_Wrap( gsl_function *p )
{
	return p;
}
gsl_function* Dao_gsl_function_Copy( const gsl_function p )
{
	gsl_function *copy = malloc( sizeof( gsl_function ) );
	memcpy( copy, & p, sizeof( gsl_function ) );
	return copy;
}*/
static double Dao_gsl_function_function( double x, void* self0 )
{
  Dao_gsl_function *self = (Dao_gsl_function*) self0;
  gsl_function *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  double _function= (double)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "function" );
  if( _ro ==NULL || _ob ==NULL ) return _function;
  return (double)Function_10007( _ro, _ob, x, self0 );
}

Dao_gsl_function_fdf* Dao_gsl_function_fdf_New()
{
	Dao_gsl_function_fdf *wrap = calloc( 1, sizeof(Dao_gsl_function_fdf) );
	gsl_function_fdf *self = (gsl_function_fdf*) wrap;
	wrap->cdata = DaoCData_New( dao_gsl_function_fdf_Typer, wrap );
	wrap->object = self;
	self->df = Dao_gsl_function_fdf_df;
	self->f = Dao_gsl_function_fdf_f;
	self->fdf = Dao_gsl_function_fdf_fdf;
	self->params = wrap;
	return wrap;
}
/*
gsl_function_fdf* Dao_gsl_function_fdf_Wrap( gsl_function_fdf *p )
{
	return p;
}
gsl_function_fdf* Dao_gsl_function_fdf_Copy( const gsl_function_fdf p )
{
	gsl_function_fdf *copy = malloc( sizeof( gsl_function_fdf ) );
	memcpy( copy, & p, sizeof( gsl_function_fdf ) );
	return copy;
}*/
static double Dao_gsl_function_fdf_df( double x, void* self0 )
{
  Dao_gsl_function_fdf *self = (Dao_gsl_function_fdf*) self0;
  gsl_function_fdf *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  double _df= (double)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "df" );
  if( _ro ==NULL || _ob ==NULL ) return _df;
  return (double)Function_10007( _ro, _ob, x, self0 );
}
static double Dao_gsl_function_fdf_f( double x, void* self0 )
{
  Dao_gsl_function_fdf *self = (Dao_gsl_function_fdf*) self0;
  gsl_function_fdf *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  double _f= (double)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "f" );
  if( _ro ==NULL || _ob ==NULL ) return _f;
  return (double)Function_10007( _ro, _ob, x, self0 );
}
static void Dao_gsl_function_fdf_fdf( double x, void* self0, double* f, double* df )
{
  Dao_gsl_function_fdf *self = (Dao_gsl_function_fdf*) self0;
  gsl_function_fdf *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "fdf" );
  if( _ro ==NULL || _ob ==NULL ) return;
  Function_10008( _ro, _ob, x, self0, f, df );
}

Dao_gsl_function_vec* Dao_gsl_function_vec_New()
{
	Dao_gsl_function_vec *wrap = calloc( 1, sizeof(Dao_gsl_function_vec) );
	gsl_function_vec *self = (gsl_function_vec*) wrap;
	wrap->cdata = DaoCData_New( dao_gsl_function_vec_Typer, wrap );
	wrap->object = self;
	self->function = Dao_gsl_function_vec_function;
	self->params = wrap;
	return wrap;
}
/*
gsl_function_vec* Dao_gsl_function_vec_Wrap( gsl_function_vec *p )
{
	return p;
}
gsl_function_vec* Dao_gsl_function_vec_Copy( const gsl_function_vec p )
{
	gsl_function_vec *copy = malloc( sizeof( gsl_function_vec ) );
	memcpy( copy, & p, sizeof( gsl_function_vec ) );
	return copy;
}*/
static int Dao_gsl_function_vec_function( double x, double y[], void* self0 )
{
  Dao_gsl_function_vec *self = (Dao_gsl_function_vec*) self0;
  gsl_function_vec *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  int _function= (int)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "function" );
  if( _ro ==NULL || _ob ==NULL ) return _function;
  return (int)Function_10009( _ro, _ob, x, y, self0 );
}

gsl_histogram* Dao_gsl_histogram_New()
{
	gsl_histogram *self = calloc( 1, sizeof(gsl_histogram) );
	return self;
}

gsl_histogram2d* Dao_gsl_histogram2d_New()
{
	gsl_histogram2d *self = calloc( 1, sizeof(gsl_histogram2d) );
	return self;
}

gsl_histogram2d_pdf* Dao_gsl_histogram2d_pdf_New()
{
	gsl_histogram2d_pdf *self = calloc( 1, sizeof(gsl_histogram2d_pdf) );
	return self;
}

gsl_histogram_pdf* Dao_gsl_histogram_pdf_New()
{
	gsl_histogram_pdf *self = calloc( 1, sizeof(gsl_histogram_pdf) );
	return self;
}

gsl_integration_qawo_table* Dao_gsl_integration_qawo_table_New()
{
	gsl_integration_qawo_table *self = calloc( 1, sizeof(gsl_integration_qawo_table) );
	return self;
}

gsl_integration_qaws_table* Dao_gsl_integration_qaws_table_New()
{
	gsl_integration_qaws_table *self = calloc( 1, sizeof(gsl_integration_qaws_table) );
	return self;
}

gsl_integration_workspace* Dao_gsl_integration_workspace_New()
{
	gsl_integration_workspace *self = calloc( 1, sizeof(gsl_integration_workspace) );
	return self;
}

gsl_interp* Dao_gsl_interp_New()
{
	gsl_interp *self = calloc( 1, sizeof(gsl_interp) );
	return self;
}

gsl_interp_accel* Dao_gsl_interp_accel_New()
{
	gsl_interp_accel *self = calloc( 1, sizeof(gsl_interp_accel) );
	return self;
}

gsl_interp_type* Dao_gsl_interp_type_New()
{
	gsl_interp_type *self = calloc( 1, sizeof(gsl_interp_type) );
	return self;
}

gsl_min_fminimizer* Dao_gsl_min_fminimizer_New()
{
	gsl_min_fminimizer *self = calloc( 1, sizeof(gsl_min_fminimizer) );
	return self;
}

gsl_min_fminimizer_type* Dao_gsl_min_fminimizer_type_New()
{
	gsl_min_fminimizer_type *self = calloc( 1, sizeof(gsl_min_fminimizer_type) );
	return self;
}

Dao_gsl_monte_function* Dao_gsl_monte_function_New()
{
	Dao_gsl_monte_function *wrap = calloc( 1, sizeof(Dao_gsl_monte_function) );
	gsl_monte_function *self = (gsl_monte_function*) wrap;
	wrap->cdata = DaoCData_New( dao_gsl_monte_function_Typer, wrap );
	wrap->object = self;
	self->f = Dao_gsl_monte_function_f;
	self->params = wrap;
	return wrap;
}
/*
gsl_monte_function* Dao_gsl_monte_function_Wrap( gsl_monte_function *p )
{
	return p;
}
gsl_monte_function* Dao_gsl_monte_function_Copy( const gsl_monte_function p )
{
	gsl_monte_function *copy = malloc( sizeof( gsl_monte_function ) );
	memcpy( copy, & p, sizeof( gsl_monte_function ) );
	return copy;
}*/
static double Dao_gsl_monte_function_f( double x_array[], size_t dim, void* self0 )
{
  Dao_gsl_monte_function *self = (Dao_gsl_monte_function*) self0;
  gsl_monte_function *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  double _f= (double)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "f" );
  if( _ro ==NULL || _ob ==NULL ) return _f;
  return (double)Function_1000a( _ro, _ob, x_array, dim, self0 );
}

gsl_monte_miser_state* Dao_gsl_monte_miser_state_New()
{
	gsl_monte_miser_state *self = calloc( 1, sizeof(gsl_monte_miser_state) );
	return self;
}

gsl_monte_plain_state* Dao_gsl_monte_plain_state_New()
{
	gsl_monte_plain_state *self = calloc( 1, sizeof(gsl_monte_plain_state) );
	return self;
}

gsl_monte_vegas_state* Dao_gsl_monte_vegas_state_New()
{
	gsl_monte_vegas_state *self = calloc( 1, sizeof(gsl_monte_vegas_state) );
	return self;
}

gsl_multifit_fdfsolver* Dao_gsl_multifit_fdfsolver_New()
{
	gsl_multifit_fdfsolver *self = calloc( 1, sizeof(gsl_multifit_fdfsolver) );
	return self;
}

gsl_multifit_fdfsolver_type* Dao_gsl_multifit_fdfsolver_type_New()
{
	gsl_multifit_fdfsolver_type *self = calloc( 1, sizeof(gsl_multifit_fdfsolver_type) );
	return self;
}

gsl_multifit_fsolver* Dao_gsl_multifit_fsolver_New()
{
	gsl_multifit_fsolver *self = calloc( 1, sizeof(gsl_multifit_fsolver) );
	return self;
}

gsl_multifit_fsolver_type* Dao_gsl_multifit_fsolver_type_New()
{
	gsl_multifit_fsolver_type *self = calloc( 1, sizeof(gsl_multifit_fsolver_type) );
	return self;
}

Dao_gsl_multifit_function* Dao_gsl_multifit_function_New()
{
	Dao_gsl_multifit_function *wrap = calloc( 1, sizeof(Dao_gsl_multifit_function) );
	gsl_multifit_function *self = (gsl_multifit_function*) wrap;
	wrap->cdata = DaoCData_New( dao_gsl_multifit_function_Typer, wrap );
	wrap->object = self;
	self->f = Dao_gsl_multifit_function_f;
	self->params = wrap;
	return wrap;
}
/*
gsl_multifit_function* Dao_gsl_multifit_function_Wrap( gsl_multifit_function *p )
{
	return p;
}
gsl_multifit_function* Dao_gsl_multifit_function_Copy( const gsl_multifit_function p )
{
	gsl_multifit_function *copy = malloc( sizeof( gsl_multifit_function ) );
	memcpy( copy, & p, sizeof( gsl_multifit_function ) );
	return copy;
}*/
static int Dao_gsl_multifit_function_f( const gsl_vector* x, void* self0, gsl_vector* f )
{
  Dao_gsl_multifit_function *self = (Dao_gsl_multifit_function*) self0;
  gsl_multifit_function *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  int _f= (int)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "f" );
  if( _ro ==NULL || _ob ==NULL ) return _f;
  return (int)Function_1000b( _ro, _ob, x, self0, f );
}

Dao_gsl_multifit_function_fdf* Dao_gsl_multifit_function_fdf_New()
{
	Dao_gsl_multifit_function_fdf *wrap = calloc( 1, sizeof(Dao_gsl_multifit_function_fdf) );
	gsl_multifit_function_fdf *self = (gsl_multifit_function_fdf*) wrap;
	wrap->cdata = DaoCData_New( dao_gsl_multifit_function_fdf_Typer, wrap );
	wrap->object = self;
	self->df = Dao_gsl_multifit_function_fdf_df;
	self->f = Dao_gsl_multifit_function_fdf_f;
	self->fdf = Dao_gsl_multifit_function_fdf_fdf;
	self->params = wrap;
	return wrap;
}
/*
gsl_multifit_function_fdf* Dao_gsl_multifit_function_fdf_Wrap( gsl_multifit_function_fdf *p )
{
	return p;
}
gsl_multifit_function_fdf* Dao_gsl_multifit_function_fdf_Copy( const gsl_multifit_function_fdf p )
{
	gsl_multifit_function_fdf *copy = malloc( sizeof( gsl_multifit_function_fdf ) );
	memcpy( copy, & p, sizeof( gsl_multifit_function_fdf ) );
	return copy;
}*/
static int Dao_gsl_multifit_function_fdf_df( const gsl_vector* x, void* self0, gsl_matrix* df )
{
  Dao_gsl_multifit_function_fdf *self = (Dao_gsl_multifit_function_fdf*) self0;
  gsl_multifit_function_fdf *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  int _df= (int)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "df" );
  if( _ro ==NULL || _ob ==NULL ) return _df;
  return (int)Function_1000c( _ro, _ob, x, self0, df );
}
static int Dao_gsl_multifit_function_fdf_f( const gsl_vector* x, void* self0, gsl_vector* f )
{
  Dao_gsl_multifit_function_fdf *self = (Dao_gsl_multifit_function_fdf*) self0;
  gsl_multifit_function_fdf *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  int _f= (int)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "f" );
  if( _ro ==NULL || _ob ==NULL ) return _f;
  return (int)Function_1000b( _ro, _ob, x, self0, f );
}
static int Dao_gsl_multifit_function_fdf_fdf( const gsl_vector* x, void* self0, gsl_vector* f, gsl_matrix* df )
{
  Dao_gsl_multifit_function_fdf *self = (Dao_gsl_multifit_function_fdf*) self0;
  gsl_multifit_function_fdf *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  int _fdf= (int)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "fdf" );
  if( _ro ==NULL || _ob ==NULL ) return _fdf;
  return (int)Function_1000d( _ro, _ob, x, self0, f, df );
}

gsl_multifit_linear_workspace* Dao_gsl_multifit_linear_workspace_New()
{
	gsl_multifit_linear_workspace *self = calloc( 1, sizeof(gsl_multifit_linear_workspace) );
	return self;
}

gsl_multimin_fdfminimizer* Dao_gsl_multimin_fdfminimizer_New()
{
	gsl_multimin_fdfminimizer *self = calloc( 1, sizeof(gsl_multimin_fdfminimizer) );
	return self;
}

gsl_multimin_fdfminimizer_type* Dao_gsl_multimin_fdfminimizer_type_New()
{
	gsl_multimin_fdfminimizer_type *self = calloc( 1, sizeof(gsl_multimin_fdfminimizer_type) );
	return self;
}

gsl_multimin_fminimizer* Dao_gsl_multimin_fminimizer_New()
{
	gsl_multimin_fminimizer *self = calloc( 1, sizeof(gsl_multimin_fminimizer) );
	return self;
}

gsl_multimin_fminimizer_type* Dao_gsl_multimin_fminimizer_type_New()
{
	gsl_multimin_fminimizer_type *self = calloc( 1, sizeof(gsl_multimin_fminimizer_type) );
	return self;
}

Dao_gsl_multimin_function* Dao_gsl_multimin_function_New()
{
	Dao_gsl_multimin_function *wrap = calloc( 1, sizeof(Dao_gsl_multimin_function) );
	gsl_multimin_function *self = (gsl_multimin_function*) wrap;
	wrap->cdata = DaoCData_New( dao_gsl_multimin_function_Typer, wrap );
	wrap->object = self;
	self->f = Dao_gsl_multimin_function_f;
	self->params = wrap;
	return wrap;
}
/*
gsl_multimin_function* Dao_gsl_multimin_function_Wrap( gsl_multimin_function *p )
{
	return p;
}
gsl_multimin_function* Dao_gsl_multimin_function_Copy( const gsl_multimin_function p )
{
	gsl_multimin_function *copy = malloc( sizeof( gsl_multimin_function ) );
	memcpy( copy, & p, sizeof( gsl_multimin_function ) );
	return copy;
}*/
static double Dao_gsl_multimin_function_f( const gsl_vector* x, void* self0 )
{
  Dao_gsl_multimin_function *self = (Dao_gsl_multimin_function*) self0;
  gsl_multimin_function *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  double _f= (double)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "f" );
  if( _ro ==NULL || _ob ==NULL ) return _f;
  return (double)Function_1000e( _ro, _ob, x, self0 );
}

Dao_gsl_multimin_function_fdf* Dao_gsl_multimin_function_fdf_New()
{
	Dao_gsl_multimin_function_fdf *wrap = calloc( 1, sizeof(Dao_gsl_multimin_function_fdf) );
	gsl_multimin_function_fdf *self = (gsl_multimin_function_fdf*) wrap;
	wrap->cdata = DaoCData_New( dao_gsl_multimin_function_fdf_Typer, wrap );
	wrap->object = self;
	self->df = Dao_gsl_multimin_function_fdf_df;
	self->f = Dao_gsl_multimin_function_fdf_f;
	self->fdf = Dao_gsl_multimin_function_fdf_fdf;
	self->params = wrap;
	return wrap;
}
/*
gsl_multimin_function_fdf* Dao_gsl_multimin_function_fdf_Wrap( gsl_multimin_function_fdf *p )
{
	return p;
}
gsl_multimin_function_fdf* Dao_gsl_multimin_function_fdf_Copy( const gsl_multimin_function_fdf p )
{
	gsl_multimin_function_fdf *copy = malloc( sizeof( gsl_multimin_function_fdf ) );
	memcpy( copy, & p, sizeof( gsl_multimin_function_fdf ) );
	return copy;
}*/
static void Dao_gsl_multimin_function_fdf_df( const gsl_vector* x, void* self0, gsl_vector* df )
{
  Dao_gsl_multimin_function_fdf *self = (Dao_gsl_multimin_function_fdf*) self0;
  gsl_multimin_function_fdf *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "df" );
  if( _ro ==NULL || _ob ==NULL ) return;
  Function_1000f( _ro, _ob, x, self0, df );
}
static double Dao_gsl_multimin_function_fdf_f( const gsl_vector* x, void* self0 )
{
  Dao_gsl_multimin_function_fdf *self = (Dao_gsl_multimin_function_fdf*) self0;
  gsl_multimin_function_fdf *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  double _f= (double)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "f" );
  if( _ro ==NULL || _ob ==NULL ) return _f;
  return (double)Function_1000e( _ro, _ob, x, self0 );
}
static void Dao_gsl_multimin_function_fdf_fdf( const gsl_vector* x, void* self0, double* f, gsl_vector* df )
{
  Dao_gsl_multimin_function_fdf *self = (Dao_gsl_multimin_function_fdf*) self0;
  gsl_multimin_function_fdf *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "fdf" );
  if( _ro ==NULL || _ob ==NULL ) return;
  Function_10010( _ro, _ob, x, self0, f, df );
}

gsl_multiroot_fdfsolver* Dao_gsl_multiroot_fdfsolver_New()
{
	gsl_multiroot_fdfsolver *self = calloc( 1, sizeof(gsl_multiroot_fdfsolver) );
	return self;
}

gsl_multiroot_fdfsolver_type* Dao_gsl_multiroot_fdfsolver_type_New()
{
	gsl_multiroot_fdfsolver_type *self = calloc( 1, sizeof(gsl_multiroot_fdfsolver_type) );
	return self;
}

gsl_multiroot_fsolver* Dao_gsl_multiroot_fsolver_New()
{
	gsl_multiroot_fsolver *self = calloc( 1, sizeof(gsl_multiroot_fsolver) );
	return self;
}

gsl_multiroot_fsolver_type* Dao_gsl_multiroot_fsolver_type_New()
{
	gsl_multiroot_fsolver_type *self = calloc( 1, sizeof(gsl_multiroot_fsolver_type) );
	return self;
}

Dao_gsl_multiroot_function* Dao_gsl_multiroot_function_New()
{
	Dao_gsl_multiroot_function *wrap = calloc( 1, sizeof(Dao_gsl_multiroot_function) );
	gsl_multiroot_function *self = (gsl_multiroot_function*) wrap;
	wrap->cdata = DaoCData_New( dao_gsl_multiroot_function_Typer, wrap );
	wrap->object = self;
	self->f = Dao_gsl_multiroot_function_f;
	self->params = wrap;
	return wrap;
}
/*
gsl_multiroot_function* Dao_gsl_multiroot_function_Wrap( gsl_multiroot_function *p )
{
	return p;
}
gsl_multiroot_function* Dao_gsl_multiroot_function_Copy( const gsl_multiroot_function p )
{
	gsl_multiroot_function *copy = malloc( sizeof( gsl_multiroot_function ) );
	memcpy( copy, & p, sizeof( gsl_multiroot_function ) );
	return copy;
}*/
static int Dao_gsl_multiroot_function_f( const gsl_vector* x, void* self0, gsl_vector* f )
{
  Dao_gsl_multiroot_function *self = (Dao_gsl_multiroot_function*) self0;
  gsl_multiroot_function *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  int _f= (int)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "f" );
  if( _ro ==NULL || _ob ==NULL ) return _f;
  return (int)Function_1000b( _ro, _ob, x, self0, f );
}

Dao_gsl_multiroot_function_fdf* Dao_gsl_multiroot_function_fdf_New()
{
	Dao_gsl_multiroot_function_fdf *wrap = calloc( 1, sizeof(Dao_gsl_multiroot_function_fdf) );
	gsl_multiroot_function_fdf *self = (gsl_multiroot_function_fdf*) wrap;
	wrap->cdata = DaoCData_New( dao_gsl_multiroot_function_fdf_Typer, wrap );
	wrap->object = self;
	self->df = Dao_gsl_multiroot_function_fdf_df;
	self->f = Dao_gsl_multiroot_function_fdf_f;
	self->fdf = Dao_gsl_multiroot_function_fdf_fdf;
	self->params = wrap;
	return wrap;
}
/*
gsl_multiroot_function_fdf* Dao_gsl_multiroot_function_fdf_Wrap( gsl_multiroot_function_fdf *p )
{
	return p;
}
gsl_multiroot_function_fdf* Dao_gsl_multiroot_function_fdf_Copy( const gsl_multiroot_function_fdf p )
{
	gsl_multiroot_function_fdf *copy = malloc( sizeof( gsl_multiroot_function_fdf ) );
	memcpy( copy, & p, sizeof( gsl_multiroot_function_fdf ) );
	return copy;
}*/
static int Dao_gsl_multiroot_function_fdf_df( const gsl_vector* x, void* self0, gsl_matrix* df )
{
  Dao_gsl_multiroot_function_fdf *self = (Dao_gsl_multiroot_function_fdf*) self0;
  gsl_multiroot_function_fdf *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  int _df= (int)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "df" );
  if( _ro ==NULL || _ob ==NULL ) return _df;
  return (int)Function_1000c( _ro, _ob, x, self0, df );
}
static int Dao_gsl_multiroot_function_fdf_f( const gsl_vector* x, void* self0, gsl_vector* f )
{
  Dao_gsl_multiroot_function_fdf *self = (Dao_gsl_multiroot_function_fdf*) self0;
  gsl_multiroot_function_fdf *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  int _f= (int)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "f" );
  if( _ro ==NULL || _ob ==NULL ) return _f;
  return (int)Function_1000b( _ro, _ob, x, self0, f );
}
static int Dao_gsl_multiroot_function_fdf_fdf( const gsl_vector* x, void* self0, gsl_vector* f, gsl_matrix* df )
{
  Dao_gsl_multiroot_function_fdf *self = (Dao_gsl_multiroot_function_fdf*) self0;
  gsl_multiroot_function_fdf *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  int _fdf= (int)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "fdf" );
  if( _ro ==NULL || _ob ==NULL ) return _fdf;
  return (int)Function_1000d( _ro, _ob, x, self0, f, df );
}

gsl_ntuple* Dao_gsl_ntuple_New()
{
	gsl_ntuple *self = calloc( 1, sizeof(gsl_ntuple) );
	return self;
}

Dao_gsl_ntuple_select_fn* Dao_gsl_ntuple_select_fn_New()
{
	Dao_gsl_ntuple_select_fn *wrap = calloc( 1, sizeof(Dao_gsl_ntuple_select_fn) );
	gsl_ntuple_select_fn *self = (gsl_ntuple_select_fn*) wrap;
	wrap->cdata = DaoCData_New( dao_gsl_ntuple_select_fn_Typer, wrap );
	wrap->object = self;
	self->function = Dao_gsl_ntuple_select_fn_function;
	self->params = wrap;
	return wrap;
}
/*
gsl_ntuple_select_fn* Dao_gsl_ntuple_select_fn_Wrap( gsl_ntuple_select_fn *p )
{
	return p;
}
gsl_ntuple_select_fn* Dao_gsl_ntuple_select_fn_Copy( const gsl_ntuple_select_fn p )
{
	gsl_ntuple_select_fn *copy = malloc( sizeof( gsl_ntuple_select_fn ) );
	memcpy( copy, & p, sizeof( gsl_ntuple_select_fn ) );
	return copy;
}*/
static int Dao_gsl_ntuple_select_fn_function( void* ntuple_data, void* self0 )
{
  Dao_gsl_ntuple_select_fn *self = (Dao_gsl_ntuple_select_fn*) self0;
  gsl_ntuple_select_fn *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  int _function= (int)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "function" );
  if( _ro ==NULL || _ob ==NULL ) return _function;
  return (int)Function_10011( _ro, _ob, ntuple_data, self0 );
}

Dao_gsl_ntuple_value_fn* Dao_gsl_ntuple_value_fn_New()
{
	Dao_gsl_ntuple_value_fn *wrap = calloc( 1, sizeof(Dao_gsl_ntuple_value_fn) );
	gsl_ntuple_value_fn *self = (gsl_ntuple_value_fn*) wrap;
	wrap->cdata = DaoCData_New( dao_gsl_ntuple_value_fn_Typer, wrap );
	wrap->object = self;
	self->function = Dao_gsl_ntuple_value_fn_function;
	self->params = wrap;
	return wrap;
}
/*
gsl_ntuple_value_fn* Dao_gsl_ntuple_value_fn_Wrap( gsl_ntuple_value_fn *p )
{
	return p;
}
gsl_ntuple_value_fn* Dao_gsl_ntuple_value_fn_Copy( const gsl_ntuple_value_fn p )
{
	gsl_ntuple_value_fn *copy = malloc( sizeof( gsl_ntuple_value_fn ) );
	memcpy( copy, & p, sizeof( gsl_ntuple_value_fn ) );
	return copy;
}*/
static double Dao_gsl_ntuple_value_fn_function( void* ntuple_data, void* self0 )
{
  Dao_gsl_ntuple_value_fn *self = (Dao_gsl_ntuple_value_fn*) self0;
  gsl_ntuple_value_fn *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  double _function= (double)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "function" );
  if( _ro ==NULL || _ob ==NULL ) return _function;
  return (double)Function_10012( _ro, _ob, ntuple_data, self0 );
}

gsl_odeiv_control* Dao_gsl_odeiv_control_New()
{
	gsl_odeiv_control *self = calloc( 1, sizeof(gsl_odeiv_control) );
	return self;
}

gsl_odeiv_control_type* Dao_gsl_odeiv_control_type_New()
{
	gsl_odeiv_control_type *self = calloc( 1, sizeof(gsl_odeiv_control_type) );
	return self;
}

gsl_odeiv_evolve* Dao_gsl_odeiv_evolve_New()
{
	gsl_odeiv_evolve *self = calloc( 1, sizeof(gsl_odeiv_evolve) );
	return self;
}

gsl_odeiv_step* Dao_gsl_odeiv_step_New()
{
	gsl_odeiv_step *self = calloc( 1, sizeof(gsl_odeiv_step) );
	return self;
}

gsl_odeiv_step_type* Dao_gsl_odeiv_step_type_New()
{
	gsl_odeiv_step_type *self = calloc( 1, sizeof(gsl_odeiv_step_type) );
	return self;
}

Dao_gsl_odeiv_system* Dao_gsl_odeiv_system_New()
{
	Dao_gsl_odeiv_system *wrap = calloc( 1, sizeof(Dao_gsl_odeiv_system) );
	gsl_odeiv_system *self = (gsl_odeiv_system*) wrap;
	wrap->cdata = DaoCData_New( dao_gsl_odeiv_system_Typer, wrap );
	wrap->object = self;
	self->function = Dao_gsl_odeiv_system_function;
	self->jacobian = Dao_gsl_odeiv_system_jacobian;
	self->params = wrap;
	return wrap;
}
/*
gsl_odeiv_system* Dao_gsl_odeiv_system_Wrap( gsl_odeiv_system *p )
{
	return p;
}
gsl_odeiv_system* Dao_gsl_odeiv_system_Copy( const gsl_odeiv_system p )
{
	gsl_odeiv_system *copy = malloc( sizeof( gsl_odeiv_system ) );
	memcpy( copy, & p, sizeof( gsl_odeiv_system ) );
	return copy;
}*/
static int Dao_gsl_odeiv_system_function( double t, const double y[], double dydt[], void* self0 )
{
  Dao_gsl_odeiv_system *self = (Dao_gsl_odeiv_system*) self0;
  gsl_odeiv_system *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  int _function= (int)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "function" );
  if( _ro ==NULL || _ob ==NULL ) return _function;
  return (int)Function_10013( _ro, _ob, t, y, dydt, self0 );
}
static int Dao_gsl_odeiv_system_jacobian( double t, const double y[], double dfdy[], double dfdt[], void* self0 )
{
  Dao_gsl_odeiv_system *self = (Dao_gsl_odeiv_system*) self0;
  gsl_odeiv_system *self2 = self->object;
  DaoCData *cdata = self->cdata;
  DaoVmProcess *vmproc = DaoVmSpace_AcquireProcess( __daoVmSpace );
  DaoObject *_ob = NULL;
  DaoRoutine *_ro = NULL;
  int _jacobian= (int)0;
  Dao_Get_Object_Method( cdata, & _ob, & _ro, "jacobian" );
  if( _ro ==NULL || _ob ==NULL ) return _jacobian;
  return (int)Function_10014( _ro, _ob, t, y, dfdy, dfdt, self0 );
}

gsl_ran_discrete_t* Dao_gsl_ran_discrete_t_New()
{
	gsl_ran_discrete_t *self = calloc( 1, sizeof(gsl_ran_discrete_t) );
	return self;
}

gsl_rng* Dao_gsl_rng_New()
{
	gsl_rng *self = calloc( 1, sizeof(gsl_rng) );
	return self;
}

gsl_rng_type* Dao_gsl_rng_type_New()
{
	gsl_rng_type *self = calloc( 1, sizeof(gsl_rng_type) );
	return self;
}

gsl_root_fdfsolver* Dao_gsl_root_fdfsolver_New()
{
	gsl_root_fdfsolver *self = calloc( 1, sizeof(gsl_root_fdfsolver) );
	return self;
}

gsl_root_fdfsolver_type* Dao_gsl_root_fdfsolver_type_New()
{
	gsl_root_fdfsolver_type *self = calloc( 1, sizeof(gsl_root_fdfsolver_type) );
	return self;
}

gsl_root_fsolver* Dao_gsl_root_fsolver_New()
{
	gsl_root_fsolver *self = calloc( 1, sizeof(gsl_root_fsolver) );
	return self;
}

gsl_root_fsolver_type* Dao_gsl_root_fsolver_type_New()
{
	gsl_root_fsolver_type *self = calloc( 1, sizeof(gsl_root_fsolver_type) );
	return self;
}


gsl_siman_params_t* Dao_gsl_siman_params_t_New()
{
	gsl_siman_params_t *self = calloc( 1, sizeof(gsl_siman_params_t) );
	return self;
}

gsl_spline* Dao_gsl_spline_New()
{
	gsl_spline *self = calloc( 1, sizeof(gsl_spline) );
	return self;
}

gsl_sum_levin_u_workspace* Dao_gsl_sum_levin_u_workspace_New()
{
	gsl_sum_levin_u_workspace *self = calloc( 1, sizeof(gsl_sum_levin_u_workspace) );
	return self;
}

gsl_sum_levin_utrunc_workspace* Dao_gsl_sum_levin_utrunc_workspace_New()
{
	gsl_sum_levin_utrunc_workspace *self = calloc( 1, sizeof(gsl_sum_levin_utrunc_workspace) );
	return self;
}

gsl_wavelet* Dao_gsl_wavelet_New()
{
	gsl_wavelet *self = calloc( 1, sizeof(gsl_wavelet) );
	return self;
}

gsl_wavelet_type* Dao_gsl_wavelet_type_New()
{
	gsl_wavelet_type *self = calloc( 1, sizeof(gsl_wavelet_type) );
	return self;
}

gsl_wavelet_workspace* Dao_gsl_wavelet_workspace_New()
{
	gsl_wavelet_workspace *self = calloc( 1, sizeof(gsl_wavelet_workspace) );
	return self;
}

